From: Florian Müllner Date: Fri, 18 Feb 2011 23:09:01 +0000 (+0100) Subject: date-menu: Adjust boxpointer position for RTL locales X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~8954 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=edc0cd36c51c99d75640b2d0abf8074cbb41e7a8;p=gnome-shell.git date-menu: Adjust boxpointer position for RTL locales We try to position the boxpointer centered above the calendar, which swaps position with the events list when using a RTL locale, so make the menu alignment dependent on the text direction. https://bugzilla.gnome.org/show_bug.cgi?id=642721 --- diff --git a/js/ui/dateMenu.js b/js/ui/dateMenu.js index dc2be15fe..9f6fb27d7 100644 --- a/js/ui/dateMenu.js +++ b/js/ui/dateMenu.js @@ -56,7 +56,10 @@ DateMenuButton.prototype = { //this._eventSource = new Calendar.FakeEventSource(); this._eventSource = new Calendar.EvolutionEventSource(); - PanelMenu.Button.prototype._init.call(this, 0.25); + let menuAlignment = 0.25; + if (St.Widget.get_default_direction() == St.TextDirection.RTL) + menuAlignment = 1.0 - menuAlignment; + PanelMenu.Button.prototype._init.call(this, menuAlignment); this._clock = new St.Label(); this.actor.set_child(this._clock);